home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak Vol F-12
/
(Vol F-12) Jun 02 2012.iso
/
Screensaver
/
screensaver_installer.exe
/
____swmx
/
scripts
/
frame_1
/
DoAction_8.as
< prev
next >
Wrap
Text File
|
2004-10-21
|
4KB
|
180 lines
_global.ScreenweaverScreen = function()
{
};
ScreenweaverScreen.prototype.getMonitor = function(monitor)
{
if(monitor == undefined)
{
return 0;
}
return monitor;
};
ScreenweaverScreen.prototype.__resolve = function(method)
{
swSystem.Screen.__returnResolve.__method = method;
return this.__returnResolve;
};
ScreenweaverScreen.prototype.__returnResolve = function(monitor)
{
var info = swSystem.data.monitors[this.getMonitor(monitor)].info;
var lcmethod = arguments.callee.__method.toLowerCase();
this.retVal = undefined;
if(lcmethod eq "getleft")
{
this.retVal = info.x;
}
else if(lcmethod eq "gettop")
{
this.retVal = info.y;
}
else if(lcmethod eq "getright")
{
this.retVal = info.cx;
}
else if(lcmethod eq "getbottom")
{
this.retVal = info.cy;
}
else if(lcmethod eq "getarea")
{
this.retVal = {x:info.x,y:info.y,cx:info.cx,cy:info.cy};
}
else if(lcmethod eq "getwidth")
{
this.retVal = info.cx - info.x;
}
else if(lcmethod eq "getheight")
{
this.retVal = info.cy - info.y;
}
else if(lcmethod eq "getworkspaceleft")
{
this.retVal = info.wx;
}
else if(lcmethod eq "getworkspacetop")
{
this.retVal = info.wy;
}
else if(lcmethod eq "getworkspaceright")
{
this.retVal = info.wcx;
}
else if(lcmethod eq "getworkspacebottom")
{
this.retVal = info.wcy;
}
else if(lcmethod eq "getworkspacearea")
{
this.retVal = {x:info.wx,y:info.wy,cx:info.wcx,cy:info.wcy};
}
else if(lcmethod eq "getworkspacewidth")
{
this.retVal = info.wcx - info.wx;
}
else if(lcmethod eq "getworkspaceheight")
{
this.retVal = info.wcy - info.wy;
}
else if(lcmethod eq "getname")
{
this.retVal = info.name;
}
if(this.retVal != undefined)
{
return this.retVal;
}
return undefined;
};
ScreenweaverScreen.prototype.getModes = function(monitor)
{
return swSystem.data.monitors[this.getMonitor(monitor)].modes;
};
ScreenweaverScreen.prototype.getMonitorCount = function()
{
return swSystem.data.monitors.length;
};
ScreenweaverScreen.prototype.setMode = function()
{
var args = {};
if(arguments[0].x == undefined)
{
args.x = arguments[0];
args.y = arguments[1];
args.d = arguments[2];
args.f = arguments[3];
args.m = arguments[4];
var callback = arguments[5];
var scope = arguments[6];
args.t = arguments[7];
args.r = arguments[8];
}
else
{
args.x = arguments[0].x;
args.y = arguments[0].y;
args.d = arguments[0].depth;
args.f = arguments[0].frequency;
args.m = arguments[1];
var callback = arguments[2];
var scope = arguments[3];
args.t = arguments[4];
args.r = arguments[5];
}
if(m == undefined)
{
m = 0;
}
swInterface.callMethod("setScreenMode",args,callback,false,scope);
};
ScreenweaverScreen.prototype.tryMode = function()
{
var args = {};
if(arguments[0].x == undefined)
{
args.x = arguments[0];
args.y = arguments[1];
args.d = arguments[2];
args.f = arguments[3];
args.m = arguments[4];
var callback = arguments[5];
var scope = arguments[6];
args.t = true;
args.r = false;
}
else
{
args.x = arguments[0].x;
args.y = arguments[0].y;
args.d = arguments[0].depth;
args.f = arguments[0].frequency;
args.m = arguments[1];
var callback = arguments[2];
var scope = arguments[3];
args.t = true;
args.r = false;
}
if(m == undefined)
{
m = 0;
}
swInterface.callMethod("setScreenMode",args,callback,false,scope);
};
ScreenweaverScreen.prototype.getMode = function(monitor, callback, scope)
{
if(monitor == undefined)
{
monitor = 0;
}
var args = {m:monitor};
swInterface.callMethod("getScreenMode",args,callback,false,scope);
};
ScreenweaverScreen.prototype.restoreMode = function(monitor, callback, scope)
{
if(monitor == undefined)
{
monitor = 0;
}
var args = {m:monitor};
swInterface.callMethod("restoreScreenMode",args,callback,false,scope);
};